﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace 智信科技物流系统
{
    public partial class View : Form
    {
        public View()
        {
            InitializeComponent();
        }

        private void View_Shown(object sender, EventArgs e)
        {
            this.Text ="信息数量:" + dg_view.Rows.Count;
        }

        private void dg_view_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            for (int i = 0; i < Logistics.list.Count; i++)
            {
                if (Logistics.list[i].Id.Equals(dg_view.SelectedRows[0].Cells["trueid"].Value))
                {
                    DetailInfor frm_infor = new DetailInfor();
                    frm_infor.tb_InforType.Text = Logistics.list[i].InformationType1;
                    frm_infor.tb_DepartureCity.Text = Logistics.list[i].DepartureCity1;
                    frm_infor.tb_DepartureTime.Text = Logistics.list[i].DepartureTime1;
                    frm_infor.tb_ReleaseTo.Text = Logistics.list[i].ReleaseTo1;
                    frm_infor.tb_username.Text = Logistics.list[i].UserName1;
                    frm_infor.tb_Fax.Text = Logistics.list[i].Fax1;
                    frm_infor.tb_FixedTelephone.Text = Logistics.list[i].FixedTelephone1;
                    frm_infor.tb_InformationContent.Text = Logistics.list[i].InformationContent1;
                    frm_infor.tb_MobilePhone.Text = Logistics.list[i].MobilePhone1;
                    frm_infor.tb_QQ.Text = Logistics.list[i].QQ1;
                    frm_infor.tb_ReachCity.Text = Logistics.list[i].ReachCity1;
                    frm_infor.ShowDialog();
                    return;
                }
            }
        }
    }
}
